package com.sgy.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;


/**
 * @author shenguangyang
 * @date 2022-08-14 6:17
 */
@Configuration
@ConfigurationProperties(prefix = "system")
public class SystemProperties {
    private Server server = new Server();

    public static class Server {
        private Integer port = 8888;
        private String host = "127.0.0.1";

        public Integer getPort() {
            return port;
        }

        public void setPort(Integer port) {
            this.port = port;
        }

        public String getHost() {
            return host;
        }

        public void setHost(String host) {
            this.host = host;
        }
    }

    public Server getServer() {
        return server;
    }

    public void setServer(Server server) {
        this.server = server;
    }
}
